struct ioctl_gntdev_unmap_notify notify;
notify.index = map->index;
notify.action = 0;
- if (notify_offset >= 0 && notify_offset < XC_PAGE_SIZE * count) {
+ if (notify_offset < XC_PAGE_SIZE * count) {
notify.index += notify_offset;
notify.action |= UNMAP_NOTIFY_CLEAR_BYTE;
}
notify.index = gref_info->index;
notify.action = 0;
- if (notify_offset >= 0) {
+ if (notify_offset < XC_PAGE_SIZE * count) {
notify.index += notify_offset;
notify.action |= UNMAP_NOTIFY_CLEAR_BYTE;
}
- if (notify_port >= 0) {
+ if (notify_port != -1) {
notify.event_channel_port = notify_port;
notify.action |= UNMAP_NOTIFY_SEND_EVENT;
}